package com.study.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author flwu
 * @since 2020-03-20
 */
@TableName("tbl_order")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单号
     */
    private String number;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 用户手机号码（快照）
     */
    private String userPhone;

    /**
     * 用户余额（快照）
     */
    private Long userCoin;

    /**
     * 商品类型，1：明信片；2：邮票
     */
    private Boolean productType;

    /**
     * 商品ID
     */
    private Long productId;

    /**
     * 商品标题（快照）
     */
    private String productTitle;

    /**
     * 商品价格（快照）
     */
    private Long productCoin;

    /**
     * 商品信息（快照）
     */
    private String productSnapshoot;

    /**
     * 渠道平台
     */
    private String channel;

    /**
     * 实际消耗金币数量
     */
    private Long coin;

    /**
     * 状态，2：已完成
     */
    private Boolean status;

    /**
     * 创建时间
     */
    private LocalDateTime createDatetime;

    /**
     * 最后更新时间
     */
    private LocalDateTime updateDatetime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }
    public Long getUserCoin() {
        return userCoin;
    }

    public void setUserCoin(Long userCoin) {
        this.userCoin = userCoin;
    }
    public Boolean getProductType() {
        return productType;
    }

    public void setProductType(Boolean productType) {
        this.productType = productType;
    }
    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }
    public String getProductTitle() {
        return productTitle;
    }

    public void setProductTitle(String productTitle) {
        this.productTitle = productTitle;
    }
    public Long getProductCoin() {
        return productCoin;
    }

    public void setProductCoin(Long productCoin) {
        this.productCoin = productCoin;
    }
    public String getProductSnapshoot() {
        return productSnapshoot;
    }

    public void setProductSnapshoot(String productSnapshoot) {
        this.productSnapshoot = productSnapshoot;
    }
    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }
    public Long getCoin() {
        return coin;
    }

    public void setCoin(Long coin) {
        this.coin = coin;
    }
    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }
    public LocalDateTime getCreateDatetime() {
        return createDatetime;
    }

    public void setCreateDatetime(LocalDateTime createDatetime) {
        this.createDatetime = createDatetime;
    }
    public LocalDateTime getUpdateDatetime() {
        return updateDatetime;
    }

    public void setUpdateDatetime(LocalDateTime updateDatetime) {
        this.updateDatetime = updateDatetime;
    }

    @Override
    public String toString() {
        return "Order{" +
            "id=" + id +
            ", number=" + number +
            ", userId=" + userId +
            ", userPhone=" + userPhone +
            ", userCoin=" + userCoin +
            ", productType=" + productType +
            ", productId=" + productId +
            ", productTitle=" + productTitle +
            ", productCoin=" + productCoin +
            ", productSnapshoot=" + productSnapshoot +
            ", channel=" + channel +
            ", coin=" + coin +
            ", status=" + status +
            ", createDatetime=" + createDatetime +
            ", updateDatetime=" + updateDatetime +
        "}";
    }
}
